package org.yourorg.services.impl
{
	import flash.utils.setTimeout;
	
	import mx.collections.ArrayCollection;
	
	import org.yourorg.assassin.UserVo;
	import org.yourorg.services.IUserService;

	public class UserService implements IUserService
	{
		
		private static var instance:UserService;
		
		public function UserService()
		{
			if(instance){
				throw new Error("");
			}
		}
		
		public static function getInstance():UserService{
			if(!instance){
				instance = new UserService();
			}
			return instance;
		}
		
		// user this framework we suggest users catch your data at service.
		[Bindable]
		private var userVOs:ArrayCollection  = new ArrayCollection();
		private var userVOsinitedFlag:Boolean = false;
		
		[Bindable]
		public function get users():ArrayCollection{
			if(!userVOsinitedFlag){
				getUsers();
				userVOsinitedFlag = true;
			}
			return userVOs;
		}
		public function set users(us:ArrayCollection):void{
			userVOs = us;
		}
		/*public function set users():ArrayCollection{
			userVOs
		}*/
		
		
		public function getUsers():void{
			setTimeout(initUsers,1000);
		}
		
		protected function initUsers(e:*=null):void{
			
			// simulate synchronize invoke
			var usera:UserVo = new UserVo();
			usera.username = "Peter";
			usera.age = 28;
			usera.photo = "http://bj.51nfs.com/NetPhoto/Photo/15420/20090107/20090107115259CamtasiaStudio2BoxShot.jpg";
			usera.desc = "Word processing: Microsoft Word. Other applications: PowerPoint, Microsoft Publisher, QuarkExpress, PhotoShop, Excel, Access, File Maker Pro, Microsoft Outlook, Lotus Notes, Reference Manager.Writing ability (proposals, newsletters, presentations, resumes, cover letters). Internet skills. Event coordination: trade shows, seminars, user conferences. STRENGTHS: Interpersonal skills - ability to put people at ease; Dependable, organized, efficient ;Team player; Self-starter. BUSINESS EXPERIENCE: The Health Institute, Division of Clinical Care Research, New England Medical Center, Boston, MA November 2000 - Present, Executive Assistant to Director and to Research Scientist Created prepress drafts for flyers, catalogs, order forms, and price lists Managed digital image library Formatted digital images for Website Coordinated co-op program and produced credit memos Wrote memos, presentations, and correspondence for Vice President.　";			
			
			var userb:UserVo = new UserVo();
			userb.username = "Bella";
			userb.age = 21;
			userb.photo = "http://www.masternewmedia.org/images/cs5_expresshow.jpg";
			userb.desc = "Maintained Excel sheets for budget, brand ID program, and retail mailer program.　Monitored invoices.　Health Dialog, Inc., Boston, MA.　Sept. 1998-April 1999 Administrative Assistant for healthcare management firm.　Edited and produced company newsletter.　Maintained company database.　Performed Internet research on health topics and competition.　Reviewed and analyzed health videos.　Created PowerPoint presentations.　Fulfilled orders for videotapes. TEACHING EXPERIENCE: Taught in nursery school for five years and kindergarten for two years. COMMUNITY SERVICE: Prescription Parents, Inc. (a parent support group for parents of children with cleft lip/palate).　Member (1981-present), President (1995-present, 1985-87), Secretary (1984-85), Newsletter Editor (1982-84, 1987-89), Corresponding Secretary (1989-1995). Office for Children, Southern District Council, Former Member of Board of Directors.　EDUCATION: 1992-93 Katharine Gibbs School, Boston, MA. 'Entree' Business Program, Dean's List.　1971-75 Boston State College, Boston, MA. M.Ed. Early Childhood Education, Dean's List.　1967-71 Albertus Magnus College, New Haven, CT. B.A., majored in English. ";
			
			
			var userc:UserVo = new UserVo();
			userc.username = "Phobe";
			userc.age = 22;
			userc.photo = "http://www.masternewmedia.org/images/camtasia_logo.jpg";
			userc.desc = "As today's economy and competitive pressures place tighter constraints on business, IT professionals with a diverse background can provide greater value when budgets are tight. As a versatile MIS professional, I have experience in project management for a wide variety of business applications in systems and database design, quality assurance, troubleshooting and programming. My B.B.A. in Accounting has given me an exceptional understanding of financial applications. While at Johnson Corporation, my hands-on management style and strong technical skills have enabled me to meet deadlines in high-pressure environments. I am seeking a position in applications management, developing business systems or a liaison position between IT and the user community. My current compensation is $65.000. Should you have an appropriate opening which parallels my background, I would appreciate a personal interview. I look forward to hearing from you. ";
			
			
			users.addItem(usera);
			users.addItem(userb);
			users.addItem(userc);
		}
		
		
	}
}